<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/favicon.ico">
<title>System</title>
<link type="text/css" href="/Public/jcms/css/layout.css" rel="stylesheet" />	
<script type="text/javascript" src="/Public/jcms/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/Public/jcms/js/easyTooltip.js"></script>
<script type="text/javascript" src="/Public/jcms/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="/Public/jcms/js/jquery.wysiwyg.js"></script>
<script type="text/javascript" src="/Public/jcms/js/hoverIntent.js"></script>
<script type="text/javascript" src="/Public/jcms/js/superfish.js"></script>
<script type="text/javascript" src="/Public/jcms/js/custom.js"></script>
<script type="text/javascript" src="/Public/jcms/js/jquery.validate.js"></script>
<script type="text/javascript" src="/Public/jcms/js/common.js"></script>
<script type="text/javascript">
var APP = "/index.php?s=";
</script>
<style>
body{font-size:12px;}
body a{outline:none;blr:expression(this.onFocus=this.blur());}
*body{font:"Courier New", Courier, monospace;}
html{overflow-x: hidden; overflow-y: auto;}
.red{color:#F00;}
input.error{background:none;border:red 1px dotted;}
label.error{background:none;color:#F00;border:none;}
select.error{background:none;border:red 1px dotted;}
input, textarea, select{border:1px solid #06F; color:#06F;}
fieldset{border:1px solid #000;}
.noborder{border:#FFF;}
.blueunder{ color:#000000; text-decoration:none;}

.fl{float:left}
.fr{float:right}
.w50{width:50px;}
.w100{width:100px;}
.w160{width:160px;}
.w200{width:200px;}
.w300{width:300px;}
.w400{width:400px;}
.w500{width:500px;}

.h80{height:80px;}
.h100{height:100px;}

.nm{margin:0;}
.mtb2{margin:2px 0;}
.mt{margin-top:5px;}
.mb{margin-bottom:5px;}

input, textarea, select{
	border: 1px solid #000000;
	color: #000000;	
}
</style>
<!--[if lte IE 7]>
<link type="text/css" href="/Public/jcms/css/ie6.css" rel="stylesheet" />
<![endif]-->
</head>    
<body style="background:none;">
<link type="text/css" href="/Public/jcms/css/list.css" rel="stylesheet" />
	
<div id="content">
	<div id="main">
		  
        <div id="top" style="margin-bottom:10px;">
            <form action="/index.php?s=/Home/News/lists" method="get">
            <input type="hidden" name="s" value="<?php echo '/'.MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME;?>"/>
            <input type="hidden" name="act" value="search"/>
            <fieldset>
            	<legend>搜索</legend>
                <p class="fieldsetP">
                    <label>文章名称: </label>
                    <input class="sf" name="title" type="text" value="<?php echo ($title); ?>" />
                	<label>所属分类: </label>
                    <select id="cid" name="cid">
                    	<option value="">请选择...</option>
                        <?php echo ($cate); ?>
                    </select>
                    <label>排序: </label>
                    <select id="order" name="order">
                    	<option value="">请选择...</option>
                        <option value="1" <?php if($order == '1'): ?>selected="selected"<?php endif; ?>>大到小</option>
                        <option value="2" <?php if($order == '2'): ?>selected="selected"<?php endif; ?>>小到大</option>
                        <option value="3" <?php if($order == '3'): ?>selected="selected"<?php endif; ?>>自定义排序</option>
                    </select> 
                    <input type="submit" value="搜索" class="button">
                </p>  
            </fieldset>    
            </form>
        </div>          
		<ul>        
        	<li style="float:right;"><p><input onclick="selflo('<?php echo U('News/edit?act=add');?>')" class="button" type="submit" value="新增文章"></p></li>
        </ul>            
    	<table class="fullwidth" cellpadding="0" cellspacing="0" border="0">
            <thead>
                <tr>
                	<td width="30" align="center">#</td>
                    <td width="100" align="center">封面图</td>
                	<td width="100" align="center">分类</td>
                    <td width="*">文章标题</td>   
                    <td width="150" align="center">创建时间</td>
                    <td width="150" align="center">操作</td>
                </tr>
            </thead>
            <tbody>
            	<?php if(is_array($lists)): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "$empty" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                	<td align="center"><?php echo ($vo['id']); ?></td>
                    <td align="center">
                    	
                    	<?php if($vo['pic']): ?><img src="<?php echo ($vo['pic']); ?>">
                        <?php else: ?> 
                            <img src="/Public/home/page-cannot-be-found.png"><?php endif; ?>
                        
                    </td>
                	<td align="center"><?php echo ($vo['cname']); ?></td>
                    <td><?php echo ($vo["title"]); ?></td>
                    <td align="center"><?php echo (date("Y-m-d H:i:s",$vo['add_time'])); ?></td>
                    <td align="center">
                    	<a href="<?php echo getMyUrl('www');?>/article/<?php echo ($vo['id']); ?>" target="_blank">预览</a>   
                        <a href="<?php echo U('News/edit/?act=edit&id='.$vo['id']);?>">修改</a>   
                        <a href="#" onclick="del('<?php echo ($vo['id']); ?>','<?php echo ($model); ?>')">删除</a>
                    </td>
                </tr><?php endforeach; endif; else: echo "$empty" ;endif; ?>         
            </tbody>
        </table>            
        <ul>
     		<li style="float:right; margin-right:5px;"><?php echo ($page); ?></li>
        </ul>
	</div>
</div>                
<div id="SysDel" title="提示!" style="display:none;">
    <p>确定要删除?</p>
</div> 
<div id="SysMove" title="提示!" style="display:none;">
    <p>确定要转移?</p>
</div>
<div id="SysDone" title="提示!" style="display:none;">
    <p>确定要操作?</p>
</div>
<script type="text/javascript" src="/Public/jcms/js/confirm.js"></script>
</body>
</html>